package com.yupi.yuoj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.yuoj.model.dto.membershipplan.MembershipPlanQueryRequest;
import com.yupi.yuoj.model.entity.MembershipPlan;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yuoj.model.vo.MembershipPlanVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author admin
* @description 针对表【membership_plan(会员套餐表)】的数据库操作Service
* @createDate 2025-11-01 21:28:38
*/
public interface MembershipPlanService extends IService<MembershipPlan> {

    /**
     * 校验数据
     *
     * @param membershipPlan
     * @param add 对创建的数据进行校验
     */
    void validMembershipPlan(MembershipPlan membershipPlan, boolean add);

    /**
     * 获取查询条件
     *
     * @param membershipPlanQueryRequest
     * @return
     */
    QueryWrapper<MembershipPlan> getQueryWrapper(MembershipPlanQueryRequest membershipPlanQueryRequest);
    
    /**
     * 获取会员套餐封装
     *
     * @param membershipPlan
     * @param request
     * @return
     */
    MembershipPlanVO getMembershipPlanVO(MembershipPlan membershipPlan, HttpServletRequest request);

    /**
     * 分页获取会员套餐封装
     *
     * @param membershipPlanPage
     * @param request
     * @return
     */
    Page<MembershipPlanVO> getMembershipPlanVOPage(Page<MembershipPlan> membershipPlanPage, HttpServletRequest request);

}
